﻿<%@ Page Title="" Language="C#" MasterPageFile="~/admin/main/AdminBase.Master" AutoEventWireup="true" CodeBehind="add_roleauth.aspx.cs" Inherits="Com.Ompchina.Web.admin.system.add_roleauth" %>
<%@ Import Namespace="System.Collections.Generic" %>
<%@ Import Namespace="Model.AuthModel" %>
<asp:Content ID="Content1" ContentPlaceHolderID="cph_header" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cph_pagename" runat="server">
    权限配置 &gt; 角色授权 &gt; <%= _DefaultRoles.RolesName %>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="cph_pagelink" runat="server">
    <li><a href="list_role.aspx?action=list">返回角色列表</a></li>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="cph_main" runat="server">
<form id="frm_addRoleAuth" runat="server">
<table class="table" cellpadding="0" cellspacing="0">
    <asp:Repeater ID="rptModuleType" runat="server" OnItemDataBound="rptModuleType_ItemDataBound">        
        <ItemTemplate>
            <tr>
                <th colspan="4">模块分类：<%# ((ModuleTypeInfo)Container.DataItem).ModuleTypeName %></th>
            </tr>
            <asp:Repeater ID="rptModule" runat="server">
                <HeaderTemplate>
                    <tr>
                        <th class="w200">模块名称</th>
                        <th>模块地址</th>
                        <th class="w100">功能名称</th>
                        <th class="center w100">选择</th>
                    </tr>
                </HeaderTemplate>
                <ItemTemplate>
                    <tr class="item">
                        <td><%# ((AuthInfo)Container.DataItem).Module.ModuleName %></td>
                        <td><%# Server.HtmlDecode(((AuthInfo)Container.DataItem).Module.ModuleLink) %></td>
                        <td><%# ((AuthInfo)Container.DataItem).Func.FuncName %></td>
                        <td class="center"><asp:CheckBox ID="chkTake" runat="server" Text="" ></asp:CheckBox><asp:HiddenField ID="hfAuth" runat="server" Value='<%# ((AuthInfo)Container.DataItem).AuthID %>' /></td>                
                    </tr>
                </ItemTemplate> 
                <AlternatingItemTemplate>
                    <tr class="aitem">
                        <td><%# ((AuthInfo)Container.DataItem).Module.ModuleName %></td>
                        <td><%# Server.HtmlDecode(((AuthInfo)Container.DataItem).Module.ModuleLink) %></td>
                        <td><%# ((AuthInfo)Container.DataItem).Func.FuncName %></td>
                        <td class="center"><asp:CheckBox ID="chkTake" runat="server" Text="" ></asp:CheckBox><asp:HiddenField ID="hfAuth" runat="server" Value='<%# ((AuthInfo)Container.DataItem).AuthID %>' /></td>                
                    </tr>
                </AlternatingItemTemplate>
            </asp:Repeater>
        </ItemTemplate>
    </asp:Repeater>    
    <tr>
    	<th colspan="4"><asp:Button ID="btnSave" runat="server" Text="保存" onclick="btnSave_Click" /><asp:HiddenField ID="hfID" runat="server" Value="0" /></th>
    </tr>
</table>
</form>
</asp:Content>
